package utils;

/**
 * Created by ZhaiGuaili on 2018/7/26.
 */
public class StringUtils {
    public static boolean hasLength(String str) {
        return hasLength((CharSequence)str);
    }

    private static boolean hasLength(CharSequence str) {
        return (str != null && str.length() > 0);
    }

    public static boolean hasText(String str){
        return hasText((CharSequence)str);
    }

    private static boolean hasText(CharSequence str){
        for (int i = 0; i<str.length();i++) {
            if (!Character.isWhitespace(str.charAt(i))) {
                return true;
            }
        }
        return false;
    }
}
